package com.joint.base.entity;

import com.joint.base.bean.FlowEnum;
import com.joint.base.parent.BaseEntity;

import javax.persistence.*;
import java.util.List;

/**
 * 任务流程信息表
 * Created by ZhuChunXiao on 2017/2/6.
 */
@Entity
@Table(name="sys_taskflow")
public class TaskFlow  extends BaseEntity {
    private static final long serialVersionUID = -5937796218882237669L;
    //任务实例表
    private TaskEntity taskEntity;
    //操作人
    private Users users;
    //职责
    private Duty duty;
    //意见
    private String comment;
    //类型
    private FlowEnum.TaskFlowType type;
    //对应下一步的步骤简要表
    private StepBrief stepBrief;

    @ManyToOne(fetch = FetchType.LAZY)
    public Users getUsers() {
        return users;
    }

    public void setUsers(Users users) {
        this.users = users;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public Duty getDuty() {
        return duty;
    }

    public void setDuty(Duty duty) {
        this.duty = duty;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public TaskEntity getTaskEntity() {
        return taskEntity;
    }

    public void setTaskEntity(TaskEntity taskEntity) {
        this.taskEntity = taskEntity;
    }

    @Column(name="type", length = 10)
    @Enumerated(EnumType.STRING)
    public FlowEnum.TaskFlowType getType() {
        return type;
    }

    public void setType(FlowEnum.TaskFlowType type) {
        this.type = type;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public StepBrief getStepBrief() {
        return stepBrief;
    }

    public void setStepBrief(StepBrief stepBrief) {
        this.stepBrief = stepBrief;
    }
}
